<!-- 面包屑 -->
<template>
  <el-breadcrumb :separator-icon="ArrowRight">
    <el-breadcrumb-item
      v-show="$route.fullPath != '/index/homepage'"
      :to="{ path: '/' }"
      >{{ $t("home") }}</el-breadcrumb-item
    >
    <el-breadcrumb-item
      v-for="item in $route.matched.slice(1)"
      :key="item.path"
    >
      <span v-show="item.name != 'homepage'">{{ $t(item.meta.title) }}</span>
    </el-breadcrumb-item>
  </el-breadcrumb>
</template>

<script>
import { ArrowRight } from "@element-plus/icons-vue";
import { markRaw } from "vue"; //让target不能被reactive或readonly(代理对象)

export default {
  data() {
    return {
      ArrowRight: markRaw(ArrowRight),
    };
  },
  components: {
    ArrowRight,
  },
};
</script>

<style></style>
